<?php

require_once dirname(__FILE__) . '/../lib/pagesGeneratorConfiguration.class.php';
require_once dirname(__FILE__) . '/../lib/pagesGeneratorHelper.class.php';

/**
 * pages actions.
 *
 * @package    dolpheuscms
 * @subpackage pages
 * @author     Harrie Essing
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class pagesActions extends autoPagesActions
{

    public function executeListUp(sfWebRequest $request)
    {
        $page = $this->getRoute()->getObject();
        $page->movePositionUp($request->getParameter('id'), $page->getPosition());

        $this->getUser()->setFlash('notice', $page->getTitle() . ' positie omhoog');

        $this->redirect('dolpheuscms_pages');
    }

    public function executeListDown(sfWebRequest $request)
    {
        $page = $this->getRoute()->getObject();
        $page->movePositionDown($request->getParameter('id'), $page->getPosition());

        $this->getUser()->setFlash('notice', $page->getTitle() . ' positie omlaag');

        $this->redirect('dolpheuscms_pages');
    }

}